Skip to content

Add Russian localization and i18n foundation#133

Open
DrMaks22 wants to merge 5 commits into
msitarzewski:mainfrom
DrMaks22:codex/ru-localization-i18n
Open

Add Russian localization and i18n foundation#133
DrMaks22 wants to merge 5 commits into
msitarzewski:mainfrom
DrMaks22:codex/ru-localization-i18n

Conversation

@DrMaks22

@DrMaks22 DrMaks22 commented Jul 7, 2026

Copy link
Copy Markdown

Summary

  • Add a lightweight, project-native i18n foundation for both desktop shells: Svelte/Tauri TypeScript catalogs plus native SwiftPM Localizable resources and an L10n facade.
  • Add professional Russian UI coverage across high-visibility surfaces: navigation, Dashboard, Library, Discover, Trending, Snapshots, Services, Activity, Settings, Package detail, update/security/network copy, recovery flows, GitHub sign-in text, and common action/error states.
  • Preserve stable contracts: Homebrew tokens, formula/cask names, brew commands and flags, route/storage keys, API names, URLs, product/provider names, and Brewfile as a format name.
  • Add localized enrichment overlays for package prose: English base enrichment remains canonical, while enrichment.<locale> partial overlays replace user-facing prose and add locale-specific search_terms without translating package identifiers, similar, or technical tags.
  • Make search locale-aware in both shells: Russian package summaries/use cases/search aliases and localized category names are indexed while English fallback, exact package-token search, and stable IDs continue to work.
  • Add a Russian seed package-prose overlay for common packages (wget, curl, git, node, python@3.13, postgresql@14, visual-studio-code, firefox, google-chrome, vlc, docker, slack, neovim, ripgrep, openssl@3, ffmpeg, redis, kubernetes-cli).

Future Localization Path

  • tools/enrich/README.md now documents the intended workflow for additional languages:
    1. Add the UI locale first (src/lib/i18n, language selector, native Localizable resources, native locale routing).
    2. Add optional package-prose overlays as native/Sources/BrewBrowserKit/Resources/enrichment.<locale>.json.
    3. Generate the matching Tauri gzip at src-tauri/data/enrichment.<locale>.json.gz with deterministic gzip settings.
    4. Add the locale bucket in Rust and Swift, category aliases, live-enrichment merge policy, and parity tests.
  • Overlay rules are explicit: translate friendly_name, summary, use_cases; add searchable natural-language aliases in search_terms; do not translate similar, tags, package tokens, commands, flags, URLs, APIs, or product names.

Notes

  • Native Activity job labels remain stored in their original semantic English form so RecentChanges parsing and existing tests keep working; rendered labels and notifications are localized through L10n.
  • Runtime/upstream content such as raw Homebrew output, package descriptions from upstream, filesystem paths, URLs, and provider/product names remains unchanged unless wrapped by UI copy.
  • Full localization of the entire Homebrew package catalog is intentionally not attempted in this PR. The new overlay schema is the maintainable path for curated or generated package-prose localization over time.

Validation

  • npm run check passes: 0 errors, 0 warnings.
  • npm test passes: 4 files, 49 tests.
  • cargo fmt --manifest-path src-tauri/Cargo.toml --check passes.
  • cargo test --manifest-path src-tauri/Cargo.toml passes: 671 passed, 6 ignored integration tests.
  • cd native && swift build passes.
  • cd native && swift test passes: 173 tests.
  • git diff --check passes.
  • TypeScript locale parity passes: 833 English keys / 833 Russian keys.
  • Native .strings parity passes for both SwiftPM targets: 830 English keys / 830 Russian keys, no missing/extra Russian keys.
  • Native .xcstrings coverage passes for both SwiftPM targets: 830 keys, no missing Russian localizations and no needs_review Russian entries.
  • Russian enrichment overlay parity passes: readable native JSON and embedded Tauri gzip are semantically identical.
  • ru-localization docs structure check passes for tools/enrich/README.md.
  • ru-localization quality lint passes for enrichment.ru.json with 0 findings. The broader TS/native string-file lint still reports known false positives because it treats English source keys (for example "Open Settings") as visible Russian text; remaining items were manually reviewed.
  • Source plural audit reports heuristic findings in native count/helper/parser code; reviewed manually. Russian-visible count strings route through ruPlural, and English Activity labels remain stable internal event identifiers with localized render output.

Visual QA Limitations

  • Browser smoke and local builds cannot fully exercise signed Tauri/macOS runtime-only flows such as live Homebrew IPC, GitHub device flow, permission prompts, and package data that depends on the user's installed Homebrew state. Build/test coverage passes for both shells; release QA should still launch the packaged Russian Tauri and native apps and review those runtime-only flows.

@DrMaks22 DrMaks22 marked this pull request as ready for review July 7, 2026 16:15
@DrMaks22 DrMaks22 changed the title Add Russian UI localization Add Russian localization and i18n foundation Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant